package org.redrock.test.repository;

import com.google.gson.Gson;
import org.springframework.stereotype.Repository;

@Repository
public class GsonRepository {
    private Gson gson = new Gson();

    public <T>T fromJson(String data, Class<T> tClass) {
        return gson.fromJson(data, tClass);
    }

    public String toJson(Object object) {
        return gson.toJson(object);
    }
}